from django.db import models

# Create your models here.

class User_Sites(models.Model):

    id = models.CharField(max_length=150, verbose_name='id', default='',primary_key=True)
    create_name = models.CharField(max_length=150, verbose_name='创建人名称', default='')
    create_by = models.CharField(max_length=150, verbose_name='创建人登录名称', default='')
    create_date = models.DateTimeField(verbose_name='创建时间', default='')
    update_name = models.CharField(max_length=150, verbose_name='更新人名称', default='')
    update_by = models.CharField(max_length=150, verbose_name='更新人登录名称', default='')
    update_date = models.DateTimeField(verbose_name='更新时间', default='')
    bpm_status = models.CharField(max_length=150, verbose_name='流程状态', default='')
    site_name = models.CharField(max_length=150, verbose_name='网站名称', default='')
    domain = models.CharField(max_length=150, verbose_name='域名', default='')
    user_id = models.CharField(max_length=150, verbose_name='用户id', default='')
    hit_avg_price = models.CharField(max_length=150, verbose_name='平均点击价格', default='')
    industry_id = models.CharField(max_length=150, verbose_name='所属行业id', default='')
    has_data = models.CharField(max_length=150, verbose_name='是否连接成功', default='')
    last_detection_time = models.DateTimeField(verbose_name='上次检测时间', default='')
    display_domain = models.CharField(max_length=150, verbose_name='展示域名', default='')

    class Meta:
        verbose_name = '易数宝定时任务UserSites信息'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.id
class User(models.Model):
    id = models.CharField(max_length=150, verbose_name='id', default='',primary_key=True)
    create_name = models.CharField(max_length=150, verbose_name='创建人名称', default='')
    create_by = models.CharField(max_length=150, verbose_name='创建人登录名称', default='')
    create_date = models.DateTimeField(verbose_name='创建时间', default='')
    update_name = models.CharField(max_length=150, verbose_name='更新者', default='')
    update_by = models.CharField(max_length=150, verbose_name='更新人登录名称', default='')
    update_date = models.DateTimeField(verbose_name='更新时间', default='')
    sys_org_code = models.CharField(max_length=150, verbose_name='所属部门', default='')
    sys_company_code = models.CharField(max_length=150, verbose_name='所属公司', default='')
    bpm_status = models.CharField(max_length=150, verbose_name='流程状态', default='')
    username = models.CharField(max_length=150, verbose_name='用户名', default='')
    password = models.CharField(max_length=150, verbose_name='用户密码', default='')
    email = models.CharField(max_length=150, verbose_name='邮箱', default='')
    mobile = models.CharField(max_length=150, verbose_name='手机号', default='')
    address = models.CharField(max_length=150, verbose_name='地址', default='')
    postcode = models.CharField(max_length=150, verbose_name='邮编', default='')
    idnumber = models.CharField(max_length=150, verbose_name='身份证号码', default='')
    role_id = models.CharField(max_length=150, verbose_name='角色', default='')
    user_status = models.IntegerField(verbose_name='用户状态', blank=True,default='0')
    company_name = models.CharField(max_length=150, verbose_name='客户公司名称', default='公司名称未填写')
    is_synchronized_industry = models.CharField(max_length=150, verbose_name='同步行业', default='N')
    remark = models.CharField(max_length=150, verbose_name='备注', default='')
    pay_status = models.CharField(max_length=150, verbose_name='续费状态', default='')
    if_give_wap = models.CharField(max_length=150, verbose_name='是否赠送wap站', default='')
    first_online_date = models.CharField(max_length=150, verbose_name='首次上线日期', default='')
    customer_name = models.CharField(max_length=150, verbose_name='客户姓名', default='')
    sales_name = models.CharField(max_length=150, verbose_name='销售姓名', default='')
    sales_department = models.CharField(max_length=150, verbose_name='销售部门', default='')
    company_id = models.IntegerField(verbose_name='关联KAD系统的公司id')
    user_id_KAD = models.IntegerField( verbose_name='关联KAD系统的所属sem用户id')
    company_state = models.CharField(max_length=150, verbose_name='代运营公司状态', default='')
    sys_user_id = models.CharField(max_length=150, verbose_name='所属员工(系统用户)', default='')
    phone_pay = models.CharField(max_length=150, verbose_name='签约用户联系手机号', default='')
    account_state = models.IntegerField(verbose_name='账户推广状态')

    class Meta:
        verbose_name = '易数宝公司定时任务User信息'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.id

class Contract(models.Model):
    id = models.CharField(max_length=150, verbose_name='id', default='', primary_key=True)
    create_name = models.CharField(max_length=150, verbose_name='创建人名称', default='')
    create_by = models.CharField(max_length=150, verbose_name='创建人登录名称', default='')
    create_date = models.DateTimeField(verbose_name='创建时间', default='')
    update_name = models.CharField(max_length=150, verbose_name='更新者', default='')
    update_by = models.CharField(max_length=150, verbose_name='更新人登录名称', default='')
    update_date = models.DateTimeField(verbose_name='更新时间', default='')
    sys_org_code = models.CharField(max_length=150, verbose_name='所属部门', default='')
    sys_company_code = models.CharField(max_length=150, verbose_name='所属公司', default='')
    bpm_status = models.CharField(max_length=150, verbose_name='流程状态', default='')
    user_id_back = models.CharField(max_length=150, verbose_name='用户id', default='')
    username = models.CharField(max_length=150, verbose_name='用户名', default='')
    channel_id = models.CharField(max_length=150, verbose_name='推广平台id', default='')
    sign_date = models.CharField(max_length=150, verbose_name='签约时间', default='')
    expire_date = models.CharField(max_length=150, verbose_name='合约到期时间', default='')
    service_cycle = models.CharField(max_length=150, verbose_name='服务周期', default='')
    service_price = models.CharField(max_length=150, verbose_name='服务费用', default='')
    ad_online_date  = models.CharField(max_length=150, verbose_name='广告上线时间', default='')
    ad_offline_date = models.CharField(max_length=150, verbose_name='广告下线时间', default='')
    if_effective = models.CharField(max_length=150, verbose_name='是否有效', default='')
    remark = models.CharField(max_length=150, verbose_name='备注', default='')
    employee_name = models.CharField(max_length=150, verbose_name='员工姓名', default='')
    employee_num = models.CharField(max_length=150, verbose_name='员工编号', default='')

    class Meta:
        verbose_name = '易数宝定时任务合同信息'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.id


